﻿@{
    ViewBag.Title = "Product";
   Layout = null;
    //ViewBag.TypeMenu = 2;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />
    <title>云商品库</title>
    <link rel="stylesheet" type="text/css" href="/css/base.css?v=1.11" />
    <link href="/css/style.css" rel="stylesheet" />
    <link href="/css/swipper.css" rel="stylesheet" />
    <link href="/css/preload.css" rel="stylesheet" />
    <link href="/css/loading.css" rel="stylesheet" />
    <script src="/js/jquery-1.7.2.min.js"></script>
    <script src="/js/clipboard.min.js"></script>
    <script>
        var deviceWidth = document.documentElement.clientWidth;
        if (deviceWidth > 750) deviceWidth = 750;
        document.documentElement.style.fontSize = deviceWidth / 7.5 + "px";
        document.documentElement.style.width = "100%";
    </script>
    <script src="/js/htool.js"></script>
    <script src="/js/asynloading.js"></script>
</head>
<body>
    <div id="containter" class="container">
        <!--固定的-->
        <div class="tiger_nav1" id="head_seach" style="background:#ea3b4c">
            <div class="seach_nav" style="background:#ea3b4c">
                <div class="seach_1" onclick="javascript:history.go(-1);return false;" style="background-image: url(/images/tige_left.png);"></div>
                <div class="seach_2">
                    <form id="search-form" action="./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili" method="get">
                        <input type="hidden" name="i" value="13">
                        <input type="hidden" name="c" value="entry">
                        <input type="hidden" name="m" value="tiger_wxdaili">
                        <input type="hidden" name="do" value="xpk">
                        <input type="text" id="key" name="key" value="" class="tige_sear" />
                        <button id="tiger_search-submit" type="submit" onclick="searchan()"><img src="/images/search.png" /></button>
                    </form>
                </div>
                <div class="seach_3" onclick="javascript:window.location.href='./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili';" style="background-image: url(/images/tiger_home.png);"></div>
            </div>
        </div>
        <input type="hidden" id="aid" value="@(ViewBag.aid)" />


        <!--固定的结束-->
        <!--浮动导航-->
        <div class="tiger_bj" id="tiger_bj" style="display:none" onclick="colok()"></div>
        <div class="tiger_nav" id="pf_seach" style="display:none">
            <div class="seach_nav" style="background:#F0584C">
                <div class="seach_1" onclick="javascript:history.go(-1);return false;" style="background-image: url(/images/tige_left.png);"></div>
                <div class="seach_2">
                    <form id="search-form" action="./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili" method="get">
                        <input type="hidden" name="i" value="13">
                        <input type="hidden" name="c" value="entry">
                        <input type="hidden" name="m" value="tiger_wxdaili">
                        <input type="hidden" name="do" value="xpk">
                        <input type="text" id="key" name="key" value="" class="tige_sear" />
                        <button id="tiger_search-submit" type="submit" onclick="searchan()"><img src="/images/search.png" /></button>
                    </form>
                </div>
                <div class="seach_3" onclick="javascript:window.location.href='./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili';" style="background-image: url(/images/tiger_home.png);"></div>
            </div>
            <div class="nav_tab">
                <div class="nav_1 tcon nav_ty" style="width:33%;" onclick="tiger_nva(1)"><span id="s1">全部分类</span><i class="arrow-icon" id="a1"></i></div>
                <div class="nav_2 tcon boleft nav_ty" style="width:33%;" onclick="tiger_nva(2)"><span id="s2">商品排序</span><i class="arrow-icon" id="a2"></i></div>
                <div class="nav_3 tcon boleft nav_ty" style="width:33%;" onclick="tiger_nva(3)"><span id="s3">筛选</span><i class="arrow-icon" id="a3"></i></div>
                <!--div class="nav_4 tcon boleft nav_ty" onclick="gzrwm()"><img src="/images/tiger_ewm.png" style="width:17px;height:17px"></div-->
            </div>
        </div>

        <!--浮动导航结束-->
        <!--TAB-->
        <div class="tiger_nav_list1" id="cd1" style="display:none">
            <ul></ul>
        </div>
        <div class="tiger_nav_list2" id="cd2" style="display:none">
            <ul>
                <li><a href="./index.php?i=13&c=entry&sort=id&do=xpk&m=tiger_wxdaili">默认排序</a></li>
                <li><a href="./index.php?i=13&c=entry&sort=hot&do=xpk&m=tiger_wxdaili">销量最高</a></li>
                <li><a href="./index.php?i=13&c=entry&sort=price&do=xpk&m=tiger_wxdaili">价格最低</a></li>
            </ul>
        </div>
        <div class="tiger_nav_list3" id="cd3" style="display:none">
            <input type="hidden" name="op" value="seach">
            <div class="jl_0">价格区间(元)</div>
            <input name="strprice" id="strprice" type="number" class="jl_1" value="" placeholder="0">
            <div class="jl_2"></div>
            <input name="endprice" id="endprice" type="number" class="jl_1" value="" placeholder="0">
            <div class="clear"></div>
            <div class="jl_3">
                <div class="jl_an" id="seachprice">确认搜索</div>
            </div>
        </div>
        <script>

            function search() {
                var key = $('#key').val();
                var strprice = $('#strprice').val();
                var endprice = $('#endprice').val();
                if (key != '') {
                    parent.location.href = "./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili" + "&key=" + $('#key').val();
                }
                if (strprice != '' || endprice != '') {
                    parent.location.href = "./index.php?i=13&c=entry&do=xpk&m=tiger_wxdaili" + "&op=seach&strprice=" + $('#strprice').val() + "&endprice=" + $('#endprice').val() + "&key=" + $('#key').val();;
                }
            }
            $(function () {
                $("#tiger_search-submit").on("click", function () {
                    search();
                });
                $("#seachprice").on("click", function () {
                    search();
                });
                $('#key').keydown(function (e) {
                    if (e.keyCode == 13) {
                        search()
                    }
                });
            });

            function searchan() {
                search();
            }





       







        </script>
        <link href="/css/nav.css" rel="stylesheet" />
        <script src="/js/nav.js"></script>
        <!--TAB结束-->
        <style type="text/css">
            .gdleft {
                width: 7.5rem;
                position: relative;
            }

            .tiger_l1 {
                width: 2rem;
                float: left;
            }

            .tiger_l2 {
                width: 4rem;
                float: left;
            }

                .tiger_l2 h3 {
                    font-size: 14px;
                    display: block;
                    width: 98%;
                }

                .tiger_l2 .table1 {
                    font-size: 14px;
                }

            .collapse {
                border-collapse: collapse;
                border: 1px #c9c9c9 solid;
            }

                .collapse td {
                    padding-left: 6px;
                    text-align: left;
                    line-height: 25px;
                    height: 25px;
                }

            .tiger_l3 {
                width: 1.5rem;
                float: left;
            }

            .red {
                color: #ff0000;
            }

            .tiger_l3 .boan {
                width: 80%;
                text-align: center;
                height: 1rem;
                line-height: 1rem;
                background: #F0584C;
                color: #fff;
                font-size: 14px;
                border: 2px #e6e6e6 solid;
                display: block;
            }
        </style>
        <div class="goods_list" style="margin-top:0;">
            <section class="goods" id="pageCon" style="padding-bottom:50px;">
                <ul id="list_box"></ul>
                <div id='list_more' style="text-align: center;">
                    <span onclick="get_list(0);">查看更多</span>
                </div>
            </section>
        </div>

    </div>
    
    @if (ViewBag.MenuType != 0)
    {
        int mt = ViewBag.MenuType;

        var model = new { MenuType = 2, user_name = (string)ViewBag.user_name };


        var data = new ViewDataDictionary();
        data.Add("MenuType", 2);
        data.Add("user_name", ViewBag.user_name.ToString());


        Html.RenderPartial("_agent_menu", model);

        //.Partial("_agent_menu", (int)ViewBag.MenuType);
    }

        <link rel="stylesheet" href="/css/dropload.css">
        <script src="/js/dropload.min.js"></script>
        <script type="text/javascript">
            var yjtype = "0";
            var limit = 1;
            var dlbl = "50";
            var openid = "oD2mMwRci4tRWMmMHn5h7IWjynLY";

            var aid = $("#aid").val();

            function get_list(ty) {

                if (ty == 1) {
                    $("#pageCon .list_box").html('');
                } else {
                    $("#list_more").html('<div style="width:100%;line-height:25px;height:25px;text-align:center"><span > 卖命加载中...</span></div>');
                }

                $.ajax({
                    type: "post",
                    //url: "/home/DLProduct",//"./index.php?i=13&c=entry&do=getlist&m=tiger_wxdaili",
                    url: "/" + aid + "/getDLProduct.html",
                    data: {
                        limit: limit,
                        openid: openid,
                    },
                    dataType: "json",
                    success: function (data) {
                        if (data.State == true) {
                            var list = data.rows.CurrentPageList;
                            var content = '';
                            for (var i = 0; i < list.length; i++) {

                                content += '<li class="relative" style="border-bottom:0;padding-bottom:2px;">';
                                content += '<div class="gdleft">';
                                content += '<div id="" class="tiger_l1">';
                                content += '<img src="' + list[i]["pictUrl"] + '_500x500.jpg" alt="" width="90%"/>';
                                content += '</div>';
                                content += '<div id="" class="tiger_l2">';
                                content += ' <h3>' + list[i]["title"] + '</h3>';
                                content += '<div class="table1" >';
                                content += '<table width="98%" cellspacing="0" cellpadding="0" border="1" class="collapse">';
                                content += '<tr>';
                                content += '<td>券后<span class="red">' + list[i]["zkPrice"] + '</span>元</td>';
                                content += '<td>券' + list[i]["couponAmount"] + '元</td>';
                                content += '</tr>';
                                content += '<tr>';
                                //content +='<td>';
                                ///if(list[i]["lxtype"]==2){
                                //  content +='鹊桥'+list[i]["tk_rate"]+'%';
                                // }else if(list[i]["lxtype"]==1){
                                //   content +='定向'+list[i]["tk_rate"]+'%';
                                // }else{
                                //   content +='普通'+list[i]["tk_rate"]+'%';
                                // }
                                // content +='</td>';
                                content += '<td colspan="2">代理佣金预估<span class="red">' + (parseInt(list[i]["tkRate"])/100 * parseInt(list[i]["zkPrice"])).toFixed(2) + '</span>元</td>';
                                content += '</tr>';
                                content += '</table>';
                                content += '</div>';
                                content += '</div>';
                                content += '<div class="tiger_l3">';
                                content += ' <a href="javascript:;" class="boan new-coupon" data-img="' + list[i]['pictUrl'] + '_240x240.jpg" data-openid="oD2mMwRci4tRWMmMHn5h7IWjynLY" data-dluid=""  data-rxyjxs="0" data-id="' + list[i]['auctionId'] + '" data-url="' + list[i][''] + '"  data-numiid="' + list[i]['num_iid'] + '" data-orgprice="' + list[i]['org_price'] + '"  data-price="' + list[i]['price'] + '" coupons_price="' + list[i]['coupons_price'] + '" data-title="' + list[i]['title'] + '" data-tkrate="' + list[i]['tk_rate'] + '"  data-caid="'+list[i]['couponActivityId'] +'" style="background:#ea3b4c">分享</a>';
                                content += '</div>';
                                content += '</div>';
                                content += '</li>';
                                content += '<li class="relative" style="padding-top:0;">';
                                content += '<table width="98%" cellspacing="0" cellpadding="0" border="1" class="collapse" style="font-size:12px;">';
                                content += '<tr>';
                                //content += '<td widty="33%">剩余' + list[i]["coupons_take"] + '张</td>';
                                //content += '<td widty="33%">已领取' + list[i]["coupons_total"] + '张</td>';
                                //content += '<td widty="33%">销量' + list[i]["goods_sale"] + '</td>';
                                content += '</tr>';
                                content += '</table>';
                                content += '</li>';

                            }
                            $("#pageCon #list_box").append(content);
                            var aa = $(".goods-list li").innerWidth();
                            $(".goods-list li img").css('height', aa);
                            if (list.length > 1) {
                                $("#list_more").html('<span onclick="get_list(0);">点击查看更多</span>');
                            } else {
                                $("#list_more").html('<span></span>');
                                $("#list_more").fadeOut(500);
                            }
                            limit++;




                            //waterfall();
                            //lazy_img();
                        } else if (data.status == 2) {
                            $("#list_more").html('<span>没有更多记录！</span>');
                            //dialog("没有更多记录！");
                            $("#list_more").fadeOut(500);

                        } else {
                            $("#list_more").html('<span>没有更多记录！</span>');
                            //dialog("没有更多记录！！");
                            $("#list_more").fadeOut(500);
                        }
                    },
                    error: function (xhr, type) {

                    }
                });


            }
            get_list(0);


            //==============自动加载=============
            //获取滚动条当前的位置
            function getScrollTop() {
                var scrollTop = 0;
                if (document.documentElement && document.documentElement.scrollTop) {
                    scrollTop = document.documentElement.scrollTop;
                }
                else if (document.body) {
                    scrollTop = document.body.scrollTop;
                }
                return scrollTop;
            }

            //获取当前可是范围的高度
            function getClientHeight() {
                var clientHeight = 0;
                if (document.body.clientHeight && document.documentElement.clientHeight) {
                    clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight);
                }
                else {
                    clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight);
                }
                return clientHeight;
            }

            //获取文档完整的高度
            function getScrollHeight() {
                return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
            }


            $(window).scroll(function () {
                if (getScrollTop() + getClientHeight() == getScrollHeight()) {
                    //alert("到达底部");
                    get_list(0);
                }
            });

            //==============自动加载=============



        </script>
    </body>
</html>
<!--./index.php?i=3&c=entry&do=dlgetlist&m=tiger_taoke&typeid=&key=&sort=&tj=&strprice=&endprice=-->
<script>
    var weid = "13";
</script>

<script src="/js/common_phone.js"></script>
<script src="/js/fun.js"></script>
<script type="text/javascript">
    $(function () {
        var clipboard = new Clipboard(".taokaocopy", {
            text: function () {
                return $(".copybox1").val();
            }
        });

        clipboard.on('success', function (e) {
            //alert("链接已复制到剪贴板");
            $(".taokaocopy").html("<img src='/images/copy1.png'>");
        });

        clipboard.on('error', function (e) {
            //console.log(e);
            $(".taokaocopy").html("<img src='/images/copy2.png'>");
        })
    });
</script>